<!DOCTYPE html>
<html>
<head>
<title>Lecture 04.md</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">

<style>
/* https://github.com/microsoft/vscode/blob/master/extensions/markdown-language-features/media/markdown.css */
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

body {
	font-family: var(--vscode-markdown-font-family, -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif);
	font-size: var(--vscode-markdown-font-size, 14px);
	padding: 0 26px;
	line-height: var(--vscode-markdown-line-height, 22px);
	word-wrap: break-word;
}

#code-csp-warning {
	position: fixed;
	top: 0;
	right: 0;
	color: white;
	margin: 16px;
	text-align: center;
	font-size: 12px;
	font-family: sans-serif;
	background-color:#444444;
	cursor: pointer;
	padding: 6px;
	box-shadow: 1px 1px 1px rgba(0,0,0,.25);
}

#code-csp-warning:hover {
	text-decoration: none;
	background-color:#007acc;
	box-shadow: 2px 2px 2px rgba(0,0,0,.25);
}

body.scrollBeyondLastLine {
	margin-bottom: calc(100vh - 22px);
}

body.showEditorSelection .code-line {
	position: relative;
}

body.showEditorSelection .code-active-line:before,
body.showEditorSelection .code-line:hover:before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: -12px;
	height: 100%;
}

body.showEditorSelection li.code-active-line:before,
body.showEditorSelection li.code-line:hover:before {
	left: -30px;
}

.vscode-light.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(0, 0, 0, 0.15);
}

.vscode-light.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(0, 0, 0, 0.40);
}

.vscode-light.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

.vscode-dark.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 255, 255, 0.4);
}

.vscode-dark.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 255, 255, 0.60);
}

.vscode-dark.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

.vscode-high-contrast.showEditorSelection .code-active-line:before {
	border-left: 3px solid rgba(255, 160, 0, 0.7);
}

.vscode-high-contrast.showEditorSelection .code-line:hover:before {
	border-left: 3px solid rgba(255, 160, 0, 1);
}

.vscode-high-contrast.showEditorSelection .code-line .code-line:hover:before {
	border-left: none;
}

img {
	max-width: 100%;
	max-height: 100%;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

a:focus,
input:focus,
select:focus,
textarea:focus {
	outline: 1px solid -webkit-focus-ring-color;
	outline-offset: -1px;
}

hr {
	border: 0;
	height: 2px;
	border-bottom: 2px solid;
}

h1 {
	padding-bottom: 0.3em;
	line-height: 1.2;
	border-bottom-width: 1px;
	border-bottom-style: solid;
}

h1, h2, h3 {
	font-weight: normal;
}

table {
	border-collapse: collapse;
}

table > thead > tr > th {
	text-align: left;
	border-bottom: 1px solid;
}

table > thead > tr > th,
table > thead > tr > td,
table > tbody > tr > th,
table > tbody > tr > td {
	padding: 5px 10px;
}

table > tbody > tr + tr > td {
	border-top: 1px solid;
}

blockquote {
	margin: 0 7px 0 5px;
	padding: 0 16px 0 10px;
	border-left-width: 5px;
	border-left-style: solid;
}

code {
	font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback";
	font-size: 1em;
	line-height: 1.357em;
}

body.wordWrap pre {
	white-space: pre-wrap;
}

pre:not(.hljs),
pre.hljs code > div {
	padding: 16px;
	border-radius: 3px;
	overflow: auto;
}

pre code {
	color: var(--vscode-editor-foreground);
	tab-size: 4;
}

/** Theming */

.vscode-light pre {
	background-color: rgba(220, 220, 220, 0.4);
}

.vscode-dark pre {
	background-color: rgba(10, 10, 10, 0.4);
}

.vscode-high-contrast pre {
	background-color: rgb(0, 0, 0);
}

.vscode-high-contrast h1 {
	border-color: rgb(0, 0, 0);
}

.vscode-light table > thead > tr > th {
	border-color: rgba(0, 0, 0, 0.69);
}

.vscode-dark table > thead > tr > th {
	border-color: rgba(255, 255, 255, 0.69);
}

.vscode-light h1,
.vscode-light hr,
.vscode-light table > tbody > tr + tr > td {
	border-color: rgba(0, 0, 0, 0.18);
}

.vscode-dark h1,
.vscode-dark hr,
.vscode-dark table > tbody > tr + tr > td {
	border-color: rgba(255, 255, 255, 0.18);
}

</style>

<style>
/* Tomorrow Theme */
/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */

/* Tomorrow Comment */
.hljs-comment,
.hljs-quote {
	color: #8e908c;
}

/* Tomorrow Red */
.hljs-variable,
.hljs-template-variable,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-regexp,
.hljs-deletion {
	color: #c82829;
}

/* Tomorrow Orange */
.hljs-number,
.hljs-built_in,
.hljs-builtin-name,
.hljs-literal,
.hljs-type,
.hljs-params,
.hljs-meta,
.hljs-link {
	color: #f5871f;
}

/* Tomorrow Yellow */
.hljs-attribute {
	color: #eab700;
}

/* Tomorrow Green */
.hljs-string,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
	color: #718c00;
}

/* Tomorrow Blue */
.hljs-title,
.hljs-section {
	color: #4271ae;
}

/* Tomorrow Purple */
.hljs-keyword,
.hljs-selector-tag {
	color: #8959a8;
}

.hljs {
	display: block;
	overflow-x: auto;
	color: #4d4d4c;
	padding: 0.5em;
}

.hljs-emphasis {
	font-style: italic;
}

.hljs-strong {
	font-weight: bold;
}
</style>

<style>
/*
 * Markdown PDF CSS
 */

 body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "Ubuntu", "Droid Sans", sans-serif, "Meiryo";
	padding: 0 12px;
}

pre {
	background-color: #f8f8f8;
	border: 1px solid #cccccc;
	border-radius: 3px;
	overflow-x: auto;
	white-space: pre-wrap;
	overflow-wrap: break-word;
}

pre:not(.hljs) {
	padding: 23px;
	line-height: 19px;
}

blockquote {
	background: rgba(127, 127, 127, 0.1);
	border-color: rgba(0, 122, 204, 0.5);
}

.emoji {
	height: 1.4em;
}

code {
	font-size: 14px;
	line-height: 19px;
}

/* for inline code */
:not(pre):not(.hljs) > code {
	color: #C9AE75; /* Change the old color so it seems less like an error */
	font-size: inherit;
}

/* Page Break : use <div class="page"/> to insert page break
-------------------------------------------------------- */
.page {
	page-break-after: always;
}

</style>

<script src="https://unpkg.com/mermaid/dist/mermaid.min.js"></script>
</head>
<body>
  <script>
    mermaid.initialize({
      startOnLoad: true,
      theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast')
          ? 'dark'
          : 'default'
    });
  </script>
<h1 id="lecture-03">Lecture 03</h1>
<h1 id="atm%E8%87%AA%E5%8A%A8%E5%8F%96%E6%AC%BE%E6%9C%BAuml%E5%BB%BA%E6%A8%A1">ATM自动取款机UML建模</h1>
<h2 id="%E4%B8%80%E8%A7%92%E8%89%B2%E9%9C%80%E6%B1%82%E5%88%86%E6%9E%90">一、角色需求分析</h2>
<p>​     （1）用户将银行卡插入读卡机，读卡机鉴定真伪后在屏幕上显示输入密码。</p>
<p>​     （2）用户通过键盘输入密码，验证系统验证密码是否正确，如果正确则提示客户选择要进行的操作。</p>
<p>​     （3）用户根据自身需求可以进存款，取款，转账，修改密码，查询账户等操作。</p>
<p>​     （4）用户根据显示器提示进行交互并完成操作。</p>
<p>​     （5）用户操作完之后，ATM机退卡。</p>
<p>​     （6）维护人员对ATM机进行加钞、加凭条纸、维护、维修等工作。</p>
<p>​     （7）数据管理员管理用户信息。</p>
<h2 id="%E4%BA%8C%E5%9F%BA%E7%A1%80%E5%BB%BA%E6%A8%A1">二、基础建模</h2>
<p>​     （1）用户用例模型：用户在ATM机上可以进行存款、转账、取款、修改密码、查询账户等选择操作。</p>
<p>​     （2）维护人员用例模型：维护人员对ATM机进行加钞、加凭条纸、维护、维修等工作。</p>
<p>​     （3）数据管理员用例模型：数据管理员管理用户信息，进行添加、修改、注销、查询等操作。</p>
<h2 id="%E4%B8%89%E7%94%A8%E4%BE%8B%E5%9B%BE">三、用例图</h2>
<p>​     （1）用例图是指由参与者（Actor）、<a href="http://baike.baidu.com/view/706238.htm">用例</a>（Use Case）以及它们之间的关系构成的用于描述系统功能的静态视图。</p>
<p>​		客户用例图中客户可以在ATM机上实现取款，存款，转账，查询余额等功能，而ATM机则需要再客户服务完之后给出凭条。</p>
<p>​        <img src="C:\Users\Lenovo\Desktop\作业\软件工程导论\图片\客户用例图.png" alt="客户用例图.png"></p>
<p>​	    银行维护人员用例图：银行维护人员要定期给ATM机进行维护，并在ATM机遇到重大故障是汇报给ATM机制造商维修，同时也负责   		一些日常维修。</p>
<p>​        <img src="C:\Users\Lenovo\Desktop\作业\软件工程导论\图片\银行维护人员用例图.png" alt="银行维护人员用例图.png"></p>
<p>​         数据管理员用例图：数据管理员要对数据进行维护和管理。</p>
<p>​         <img src="C:\Users\Lenovo\Desktop\作业\软件工程导论\图片\数据管理员用例图.png" alt="数据管理员用例图.png"></p>
<h2 id="%E5%9B%9B%E7%B1%BB%E5%9B%BE">四、类图</h2>
<p>​		类图由许多（静态）说明性的模型<a href="http://baike.baidu.com/view/19993.htm">元素</a>（例如类、包和它们之间的关系，这些元素和它们的内容互相连接）组成。ATM自动取款机可以大致分为账户，ATM机，显示屏和读卡机几个类，同时还有用户，数据管理员，银行维护人员。</p>
<p>​       <img src="C:\Users\Lenovo\Desktop\作业\软件工程导论\图片\类图.png" alt="类图.png"></p>
<h2 id="%E4%BA%94%E5%AF%B9%E8%B1%A1%E5%9B%BE">五、对象图</h2>
<p>​		对象图：根据类图进行实例化后的图像。</p>
<p>​        <img src="C:\Users\Lenovo\Desktop\作业\软件工程导论\图片\对象图.png" alt="对象图.png"></p>
<h2 id="%E5%85%AD%E6%B4%BB%E5%8A%A8%E5%9B%BE">六、活动图</h2>
<p>活动图主要表示业务的工作流程和必须要完成的工作，通常用来说明工作流程的结构</br></p>
<h2 id="%E4%B8%83%E7%8A%B6%E6%80%81%E5%9B%BE">七、状态图</h2>
<p>状态图主要描述一个实体基于事件反应的动态行为，从实体的角度出发，描述实体在不同状态之间的转化关系和相应的条件。</br></p>
<h2 id="%E5%85%AB%E6%97%B6%E5%BA%8F%E5%9B%BE">八、时序图</h2>
<p>时序图通常用于描述在一个流程中，各个组件的参与状况和操作的先后顺序，同时写明各个组件的空闲状况。</br></p>
<h2 id="%E4%B9%9D%E5%8D%8F%E4%BD%9C%E5%9B%BE">九、协作图</h2>
<p>协作图强调的是发送和接收消息的对象之间的组织结构，用于显示对象之间如何进行交互以执行特定用例或用例中特定部分的行为</br>
取钱协作图描述了用户如何与ATM自动取款机进行取钱交互</br>
<img src="..\图片\56d3210ddd81bc0edce62f760cfb37f.png" alt="协作图（取钱）">
存钱协作图描述了用户如何与ATM自动取款机进行存钱交互</br>
<img src="..\图片\a8cfb2af06fea52fefb023769c17e6c.png" alt="协作图（存钱）">
转账协作图描述了用户如何与ATM自动取款机进行转账交互</br>
<img src="..\图片\153293ac1be8d19253e845b723f516e.png" alt="协作图（转账）"></p>
<h2 id="%E5%8D%81%E7%BB%84%E4%BB%B6%E5%9B%BE">十、组件图</h2>
<p>组件图用来反映代码的物理结构
<img src="..\图片\348f2a1306ce3d9ae66ca1e1a9b3535.png" alt="组件图"></p>
<h2 id="%E5%8D%81%E4%B8%80%E9%83%A8%E7%BD%B2%E5%9B%BE">十一、部署图</h2>
<p>部署图用来显示系统中软件和硬件的物理架构
<img src="..\图片\e2e74ebc06a40cb3cffc5272de8ed7a.png" alt="部署图"></p>

</body>
</html>
